#include<stdio.h>
int main(){
    int triangle[1030][1030] = {0}; 
    int rows, sum = 1; 
    scanf("%d", &rows); 
    
    for (int i = 0; i < rows; i++) {
        sum *= 2;
    }
    rows = sum;
    
    for (int i = 0; i < rows; i++) {
        triangle[i][0] = 1; 
        for (int j = 1; j <= i; j++) {
            if (j == i) {
                triangle[i][j] = 1; 
            } else {
                triangle[i][j] = triangle[i - 1][j - 1] + triangle[i - 1][j]; // 中间数是上一行相邻两数之和
            }
        }
    }
  
    for (int i = 0; i < rows; i++) {
    
        for (int k = 0; k < (rows - i - 1); k++) {
            printf("0 "); 
        }
        for (int j = 0; j <= i; j++) { 
            if (triangle[i][j] % 2 == 0) {
                printf("0 ");
            } else {
                printf("1 "); 
            }
        }
        printf("\n"); 
    }
    return 0;
}